<template>
    <div>
        <h1 v-text="msg" ref="title"></h1>
        <button @click="showDom">点我输出上方的DOM元素</button>
        <StudentInfo></StudentInfo>
    </div>

</template>

<!--组件交互相关的代码-->
<script>
    // <!--    引入组件-->
    import StudentInfo from './components/StudentInfo'
    export default {
        name: 'App',
        components: {
            StudentInfo
        },
        data() {
            return {
                msg: 'hello'
            }
        },
        methods: {
            showDom()
            {
                console.log(this.$refs.title)
            }
        },
    }

</script>

<!--组件的样式-->
<style>

</style>
